﻿@page
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Mvc.Localization
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Card
@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Table
@using Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers
@using Volo.Abp.AspNetCore.Mvc.UI.Layout
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Pages.Shared.Components.AbpPageToolbar
@using YunxSoft.Abp.LanguageManagement.Localization
@using YunxSoft.Abp.LanguageManagement.Web.Menus
@using YunxSoft.Abp.LanguageManagement.Web.Pages.LanguageManagement.LanguageTexts
@model IndexModel
@inject IHtmlLocalizer<LanguageManagementResource> L
@inject IAuthorizationService Authorization
@inject IPageLayout PageLayout
@{
    PageLayout.Content.Title = L["LanguageTexts"].Value;
    PageLayout.Content.BreadCrumb.Add(L["Menu:Languages"].Value);
    PageLayout.Content.MenuItemName = LanguageManagementMenus.LanguageTexts;
}

@section scripts {
    <abp-script-bundle name="@typeof(IndexModel).FullName">
        <abp-script src="/client-proxies/multi-tenancy-proxy.js"/>
        <abp-script src="/Pages/LanguageManagement/LanguageTexts/Index.js"/>
    </abp-script-bundle>
}

@section content_toolbar {
    @await Component.InvokeAsync(typeof(AbpPageToolbarViewComponent), new {pageName = typeof(IndexModel).FullName})
}

<abp-card>
    <abp-card-body>
        <div class="row mb-3">
            <div class="col-3">
                <label for="baseCultureNameInput" class="form-label">@L["BaseCultureName"]</label>
                <select class="form-select" id="baseCultureNameInput" asp-items="Model.CultureInfoList"></select>
            </div>
            <div class="col-3">
                <label for="targetCultureNameInput" class="form-label">@L["TargetCultureName"]</label>
                <select class="form-select" id="targetCultureNameInput" asp-items="Model.CultureInfoList"></select>
            </div>
            <div class="col-3">
                <label for="resourceNameInput" class="form-label">@L["ResourceName"]</label>
                <select class="form-select" id="resourceNameInput" asp-items="Model.ResourcesList"></select>
            </div>
            <div class="col-3">
                <label for="getOnlyEmptyValuesInput" class="form-label">@L["TargetValue"]</label>
                <select class="form-select" id="getOnlyEmptyValuesInput">
                    <option value="">-</option>
                    <option value="true">@L["OnlyEmptyValues"]</option>
                </select>
            </div>
        </div>
        <div class="input-group mb-3">
            <input type="text" class="form-control" id="filterInput" placeholder="@L["Search"].Value"/>
            <button class="btn btn-primary search" type="button" id="search"><i class="bi bi-search"></i></button>
        </div>
    </abp-card-body>
</abp-card>
<abp-card id="LanguageTextsWrapper">
    <abp-card-body>
        <abp-table class="nowrap"></abp-table>
    </abp-card-body>
</abp-card>